﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DotNetNuke.Services.Tokens;

namespace IB.Common
{
    public class NewsTokenReplace :TokenReplace
    {

        public  NewsTokenReplace():base(Scope.DefaultSettings)
        {

            UseObjectLessExpression = true;
            PropertySource[ObjectLessToken] = new NewsInfo();
            PropertySource["news"]            =new NewsInfo();
        }
        public NewsTokenReplace(NewsInfo news) : base(Scope.DefaultSettings)
        {
            UseObjectLessExpression = true;
            PropertySource[ObjectLessToken]=news;
            PropertySource["news"]=news;
        }

        public  string ReplaceNewsInfo(string strSource)
        {
            return base.ReplaceTokens(strSource);
        }


    }
}
